package com.cmic.rcs.emoji.common.exception;

import com.cmic.rcs.enhance.message.g5.core.common.ReturnCodeEnum;
import lombok.Getter;

/**
 * @author hzr
 * @date 2022/7/4 15:18
 * @since 1.0.0
 */
@Getter
public class BaseException extends RuntimeException {

    private int code;

    public BaseException(ReturnCodeEnum errorCode) {
        super(errorCode.getMsg());
        this.code = errorCode.getCode();
    }

    public BaseException(int code, String message) {
        super(message);
        this.code = code;
    }
}
